<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Trang trái</title>
<script>
function validForm_search(){
	if (document.search_form.gia_tu.selectedIndex=="0") {
			alert("Bạn chưa chọn giá từ");
			document.search_form.gia_tu.focus();
			return false;
		}
	if (document.search_form.gia_den.selectedIndex=="0") {
			alert("Bạn chưa chọn giá đến");
			document.search_form.gia_den.focus();
			return false;
		}
	if (document.search_form.gia_tu.selectedIndex > document.search_form.gia_den.selectedIndex) {
			alert("Giá đến không được nhỏ hơn giá từ");
			document.search_form.gia_den.focus();
			return false;
		}		
}
 
</script>


<link href="style/cs1.css" rel="stylesheet" type="text/css" />
</head>

<body>
<?php
include("config/config.php");

?>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>

    <td height="36" class="giua">Laptop theo hãng</td>
  
  
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0" class="bangduoi">
  <tr>
    <td style="padding-left:35px;">
   <?php
   $lenhhang = "select * from hanglaptop";
   $kqhang = mysql_query($lenhhang);
   while($rowhang = mysql_fetch_array($kqhang))
   {
	   ?>
      <img src="image/1.png" width="6" height="9" />
        <a href="index.php?idhang=<?php echo $rowhang[0];    ?>"><?php echo $rowhang[1];     ?></a>
       <br/><br/>
       <?php
	   
   }
   
   ?>
    </td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
   
    <td height="36" class="giua">Laptop theo giá</td>
   
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0" class="bangduoi">
  <tr>
    <td align="center">
    <form id="search_form" name="search_form" method="get" action="" onsubmit="return  validForm_search()" >
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td height="30" align="center"><label for="gia_tu"></label>
	  <input name="act" type="hidden" value="laptoptheogia">
        <select name="gia_tu" class="listtimtheogia" id="gia_tu">
        <option value="">-- Giá từ --</option>
        <?php
		for($i = 1000000;$i<= 200000000; $i+=500000)
		{			
			?>
            <option value="<?php echo $i;   ?>"<?php if($_REQUEST["gia_tu"]==$i){ ?> selected <?php  }     ?>><?php  echo number_format($i,0,',','.');   ?></option>
            <?php
		
		}
		?>
      </select></td>
    </tr>
    <tr>
      <td height="30" align="center"><label for="gia_den"></label>
        <select name="gia_den" class="listtimtheogia" id="gia_den">
        <option value="">-- Giá đến --</option>
        <?php
		for($i = 1000000;$i<= 200000000; $i+=500000)
		{
			
			?>
            <option value="<?php echo $i;   ?>"<?php if($_REQUEST["gia_den"]==$i){ ?> selected <?php  }     ?>><?php  echo number_format($i,0,',','.');   ?></option>
            <?php
		}
		?>
      </select></td>
    </tr>
    <tr>
      <td height="30" align="center"><input name="tim" type="submit" class="nuttimkiem" id="tim" value="Tìm kiếm" /></td>
      
    </tr>
    <tr>
    <td>&nbsp;</td>
    </tr>
  </table>
</form>
    </td>
  </tr>
</table>


<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="36" class="giua">Giỏ hàng<img src="image/cart1.gif" width="20" height="20"></td>
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0" class="bangduoi">
  <tr>
    <td align="center">
    <?php
	include("giohang/khunggiohang.php");
	?>
    </td>
    <tr>
    <td>&nbsp;</td>
    </tr>
  </tr>
</table>
<p>

</p>
<p>


</p>


<table width="200" border="0" cellspacing="0" cellpadding="0">
  <tr>
    
    <td height="36" class="giua">Quảng cáo</td>
   
  </tr>
</table>
<table width="200" border="0" cellspacing="0" cellpadding="0" class="bangduoi">
  <tr>
   <td>
   <iframe width="195" height="200" src="//www.youtube.com/embed/oCZxzdua64Y" frameborder="0" allowfullscreen></iframe>
   </td>
  </tr>
</table>


</body>
</html>